<div ng-controller="itemCtrl">
    <!--<h3 class="page-header">商品管理</h3>-->
    <form id="paramForm" method="post" class="form-inline">
        <div class="form-group">
            <label for="keyword">关键字</label>
            <input type="text" name="keyword" size="10" id="keyword" ng-model="keyword" placeholder="关键字" class="form-control">
        </div>
        <div class="form-group">
            <label for="area">商品所在地</label>
            <input type="text" name="area" size="10" id="area" ng-model="area" placeholder="商品所在地" class="form-control">
        </div>
        <div class="form-group">
            <label for="sort">默认排序</label>
            <!--<input type="email" class="form-control" id="status" placeholder="jane.doe@example.com">-->
            <select ng-model="sort" id="sort" ng-options="x.name for x in sortSelects" class="form-control">
            </select>
        </div>
        <div class="form-group">
            <label for="startCredit">卖家信用</label>
            <!--<input type="email" class="form-control" id="status" placeholder="jane.doe@example.com">-->
            <select ng-model="startCredit" id="startCredit" ng-options="x.name for x in startCreditSelects" class="form-control">
            </select>
            -
            <select ng-model="endCredit" id="endCredit" ng-options="x.name for x in endCreditSelects" class="form-control">
            </select>
        </div>
        <div class="form-group">
            <label for="startPrice">价格</label>
            <input type="text" size="5" name="startPrice" id="startPrice" ng-model="startPrice" placeholder="下限" class="form-control">
            -
            <input type="text" size="5" name="endPrice" id="endPrice" ng-model="endPrice" placeholder="上限" class="form-control">
        </div>
        <div class="form-group">
            <label for="startCommissionRate">佣金比率</label>
            <input type="text" size="12" name="startCommissionRate" id="startCommissionRate" ng-model="startCommissionRate" placeholder="如：2345表示23.45%" class="form-control">
            -
            <input type="text" size="5" name="endCommissionRate" id="endCommissionRate" ng-model="endCommissionRate" placeholder="上限" class="form-control">
        </div>
        <!--<div class="form-group">-->
            <!--<label for="endCommissionRate">佣金比率上限</label>-->

        <!--</div>-->
        <div class="form-group">
            <label for="startTotalnum">总成交量</label>
            <input type="text" size="5" name="startTotalnum" id="startTotalnum" ng-model="startTotalnum" placeholder="下限" class="form-control">
            -
            <input type="text" size="5" name="endTotalnum" id="endTotalnum" ng-model="endTotalnum" placeholder="上限" class="form-control">
        </div>
        <div class="form-group">
            <label for="startCommissionNum">30天累计推广量(上下限一起使用才生效)</label>
            <input type="text" name="startCommissionNum" size="5" id="startCommissionNum" ng-model="startCommissionNum" placeholder="下限" class="form-control">
            -
            <input type="text" name="endCommissionNum" size="5" id="endCommissionNum" ng-model="endCommissionNum" placeholder="上限" class="form-control">
        </div>
        <label class="checkbox">
            <input type="checkbox" name="autoSend" id="autoSend" ng-model="autoSend" value="true"> 是否自动发货
        </label>
        <label class="checkbox">
            <input type="checkbox" name="cashCoupon" id="cashCoupon" ng-model="cashCoupon" value="true"> 是否支持抵价券
        </label>
        <label class="checkbox">
            <input type="checkbox" name="guarantee" id="guarantee" ng-model="guarantee" value="true"> 是否查询消保卖家
        </label>
        <label class="checkbox">
            <input type="checkbox" name="mallItem" id="mallItem" ng-model="mallItem" value="true"> 是否商城的商品
        </label>
        <label class="checkbox">
            <input type="checkbox" name="onemonthRepair" id="onemonthRepair" ng-model="onemonthRepair" value="true"> 是否30天维修
        </label>
        <label class="checkbox">
            <input type="checkbox" name="overseasItem" id="overseasItem" ng-model="overseasItem" value="true"> 是否海外商品
        </label>
        <label class="checkbox">
            <input type="checkbox" name="realDescribe" id="realDescribe" ng-model="realDescribe" value="true"> 是否如实描述
        </label>
        <label class="checkbox">
            <input type="checkbox" name="sevendaysReturn" id="sevendaysReturn" ng-model="sevendaysReturn" value="true"> 是否支持7天退换
        </label>
        <label class="checkbox">
            <input type="checkbox" name="supportCod" id="supportCod" ng-model="supportCod" value="true"> 是否支持货到付款
        </label>
        <label class="checkbox">
            <input type="checkbox" name="vipCard" id="vipCard" ng-model="vipCard" value="true"> 是否支持VIP卡
        </label>
        <button type="submit" ng-click="queryBtn()" class="btn btn-primary">查询</button> <span ng-model="totalNum">总计：{{totalNum}}  </span>
    </form>
    <form id="categoryForm" method="post" class="form-inline">
        <!--<select ng-model="categoryModel" class="multiselect" multiple="multiple" ng-options="a.name for a in categorys"></select>-->
        <!--<multiselect ng-model="categoryModel" options="a.name for a in categorys" data-multiple="true"></multiselect>-->
        <multiselect
                ng-model="categoryModel"
                options="a.name for a in categorys"
                data-multiple="true"
                scroll-after-rows="5"
                filter-after-rows="5"
                max-width="100"
                tabindex="-1">
        </multiselect>

        <button type="submit" ng-click="saveCategoryBtn()" class="btn btn-primary">设置类目</button>

        <!--<select ng-model="tagModel" class="multiselect" multiple="multiple" ng-options="a.name for a in tags"></select>-->
        <!--<multiselect ng-model="tagModel" ng-options="a.name for a in tags" data-multiple="true"></multiselect>-->
        <multiselect
                ng-model="tagModel"
                options="a.name for a in tags"
                data-multiple="true"
                scroll-after-rows="5"
                filter-after-rows="5"
                max-width="100"
                tabindex="-1">
        </multiselect>
        <button type="submit" ng-click="saveTagBtn()" class="btn btn-primary">设置标签</button>

        <button type="submit" ng-click="saveHotBtn()" class="btn btn-primary">设置热销品</button>
        <button type="submit" ng-click="saveRecomBtn()" class="btn btn-primary">设置推荐品</button>
    </form>
    <div id="pagination"></div>

    <table class="table table-condensed">
        <!--<caption>条纹表格布局</caption>-->
        <thead>
        <tr>
            <th><input type="checkbox" ng-model="checkboxAll" ng-click="checkAll(checkboxAll,items)"></th>
            <th>图片</th>
            <th>宝贝名称</th>
            <th>价格</th>
            <th>促销价格</th>
            <th>折扣价格</th>
            <th>所在地</th>
            <th>佣金比率</th>
            <th>佣金</th>
            <th>累计推广量</th>
            <th>交易量</th>
            <th>累计总支出佣金</th>
            <th>店铺类型</th>
            <!--<th></th>-->

        </tr>
        </thead>
        <tbody>
            <tr ng-repeat="x in items">
                <td><input type="checkbox" ng-click="chk(x.openIid,openIds)" name="openIds" id="openIds" ng-model="openIds"> <input type="hidden" value="{{ x.openIid}}" name="openIid"/></td>
                <td><img src="{{ x.picUrl}}" height="80" width="80" /></td>
                <td>{{ x.title}}</td>
                <td>{{ x.price}}</td>
                <td>{{ x.promotionPrice}}</td>
                <td>{{ x.couponPrice}}</td>
                <td>{{ x.itemLocation}}</td>
                <td>{{ x.commissionRate }}</td>
                <td>{{ x.commission }}</td>
                <td>{{ x.commissionNum }}</td>
                <td>{{ x.volume }}</td>
                <td>{{ x.commissionVolume }}</td>
                <td>{{ x.shopType }}</td>
                <!--<td><a href="/about">编辑</a> <a>删除</a></td>-->
            </tr>
        </tbody>
    </table>

</div>
